<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>API: yuitest  YAHOO.tool.TestManager   (YUI Library)</title>
	<link rel="stylesheet" type="text/css" href="assets/api.css">
    <script type="text/javascript" src="assets/api-js"></script>
    <script type="text/javascript" src="assets/ac-js"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">

	<div id="hd">
        <a href="http://developer.yahoo.com/yui/"><h1>Yahoo! UI Library</h1></a>
        <h3>yuitest&nbsp; <span class="subtitle">2.3.1</span></h3>
        <p>
        <a href="./index.html">Yahoo! UI Library</a> 
            &gt; <a href="./module_yuitest.html">yuitest</a>
                 &gt; YAHOO.tool.TestManager 
                
            </p>

	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form name="yui-classopts-form">
    <span id="classopts"><input type="checkbox" name="showprivate" id="showprivate" /> Show Private</span>
    <span id="classopts"><input type="checkbox" name="showprotected" id="showprotected" /> Show Protected</span>
            </form>

                    <h2>
                        

                        <code>static</code>
                        
                            Class <b>YAHOO.tool.TestManager</b>
                        <span class="extends">
                        </span>

                        <span class="extends">
                        </span>
                        
                        </code>
                    </h2>
                    <!-- class tree goes here -->
                    
                
  

                    <div class="summary description">
                        Runs pages containing test suite definitions.
                    </div>


                        <div class="section field details">
                            <h3 id="properties">Properties</h3>
                            <div class="content">
                                    <div class="private">
                                    <h4><a name="_curPage">_curPage</a>
                                        <code>- private static String</code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description">
                                            The URL of the page currently being executed.
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="private">
                                    <h4><a name="_frame">_frame</a>
                                        <code>- private static Window</code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description">
                                            The frame used to load and run tests.
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="private">
                                    <h4><a name="_logger">_logger</a>
                                        <code>- private static YAHOO.tool.TestLogger</code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description">
                                            The logger used to output results from the various tests.
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="private">
                                    <h4><a name="_pages">_pages</a>
                                        <code>- private static String[]</code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description">
                                            Array of pages to load.
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="private">
                                    <h4><a name="_results">_results</a>
                                        <code>- private static Object</code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description">
                                            Aggregated results
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="private">
                                    <h4><a name="_timeoutId">_timeoutId</a>
                                        <code>- private static int</code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description">
                                            The timeout ID for the next iteration through the tests.
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4><a name="TEST_MANAGER_BEGIN_EVENT">TEST_MANAGER_BEGIN_EVENT</a>
                                        <code>- static final string</code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description">
                                            Constant for the testmanagerbegin custom event
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4><a name="TEST_MANAGER_COMPLETE_EVENT">TEST_MANAGER_COMPLETE_EVENT</a>
                                        <code>- static final string</code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description">
                                            Constant for the testmanagercomplete custom event
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4><a name="TEST_PAGE_BEGIN_EVENT">TEST_PAGE_BEGIN_EVENT</a>
                                        <code>- static final string</code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description">
                                            Constant for the testpagebegin custom event
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4><a name="TEST_PAGE_COMPLETE_EVENT">TEST_PAGE_COMPLETE_EVENT</a>
                                        <code>- static final string</code>
                                    </h4>
                                    <div class="detail">
                                        <div class="description">
                                            Constant for the testpagecomplete custom event
                                        </div>
                                    </div>
     
                                        


                                    <hr />
                                    </div>


                            </div>
                        </div>


                        <div class="section method details">
                            <h3 id="methods">Methods</h3>
                            <div class="content">
                                    <div class="private">
                                    <h4>
                                        <a name="_handleTestRunnerComplete">_handleTestRunnerComplete</a></h4>
                                    <div class="detail">
                                        <code>
                                         private 
                                         static 
                                        
                                        Void
                                            <strong>_handleTestRunnerComplete</strong>
                                           (
                                                
                                                        
                                                         data
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Handles TestRunner.COMPLETE_EVENT, storing the results and beginning
the loop again.
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>data &lt;Object&gt;</code>
                                                             Data about the event.
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        Void
                                                    </code></dt>
                                                    <dd></dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="private">
                                    <h4>
                                        <a name="_processResults">_processResults</a></h4>
                                    <div class="detail">
                                        <code>
                                         private 
                                         static 
                                        
                                        Void
                                            <strong>_processResults</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Processes the results of a test page run, outputting log messages
for failed tests.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        Void
                                                    </code></dt>
                                                    <dd></dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="private">
                                    <h4>
                                        <a name="_run">_run</a></h4>
                                    <div class="detail">
                                        <code>
                                         private 
                                         static 
                                        
                                        Void
                                            <strong>_run</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Loads the next test page into the iframe.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        Void
                                                    </code></dt>
                                                    <dd></dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4>
                                        <a name="load">load</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                         static 
                                        
                                        Void
                                            <strong>load</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Signals that a test page has been loaded. This should be called from
within the test page itself to notify the TestManager that it is ready.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        Void
                                                    </code></dt>
                                                    <dd></dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4>
                                        <a name="setPages">setPages</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                         static 
                                        
                                        Void
                                            <strong>setPages</strong>
                                           (
                                                
                                                        
                                                         pages
                                                    
                                                
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Sets the pages to be loaded.
                                        </div>

                                        <div class="description">

                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>pages &lt;String[]&gt;</code>
                                                             An array of URLs to load.
                                                        </dd>
                                                </dl>

                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        Void
                                                    </code></dt>
                                                    <dd></dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4>
                                        <a name="start">start</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                         static 
                                        
                                        Void
                                            <strong>start</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Begins the process of running the tests.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        Void
                                                    </code></dt>
                                                    <dd></dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4>
                                        <a name="stop">stop</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                         static 
                                        
                                        Void
                                            <strong>stop</strong>
                                           (
                                            )
                                        </code>
                                        
                                        <div class="description">
                                            Stops the execution of tests.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Returns:
                                                    <code>
                                                        Void
                                                    </code></dt>
                                                    <dd></dd>
                                                </dl>
             
                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                            </div>
                        </div>


                        <div class="section method details">
                            <h3 id="events">Events</h3>
                            <div class="content">
                                    <div class="">
                                    <h4>
                                        <a name="testmanagerbegin">testmanagerbegin</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                         static 
                                        
                                            <strong>testmanagerbegin</strong>

                                            (
                                            )

                                        </code>
                                        
                                        <div class="description">
                                            Fires when the test manager starts running all test pages
                                        </div>

                                        <div class="description">




                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4>
                                        <a name="testmanagercomplete">testmanagercomplete</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                         static 
                                        
                                            <strong>testmanagercomplete</strong>

                                            (
                                                
                                                        
                                                         obj
                                                    
                                                
                                            )

                                        </code>
                                        
                                        <div class="description">
                                            Fires when the test manager finishes running all test pages.  External
test runners should subscribe to this event in order to get the
aggregated test results.
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>obj &lt; pages_passed: int, pages_failed: int, tests_passed: int
tests_failed: int, passed: string[], failed: string[],
page_results: {} &gt;</code>
                                                            
                                                        </dd>
                                                </dl>


                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4>
                                        <a name="testpagebegin">testpagebegin</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                         static 
                                        
                                            <strong>testpagebegin</strong>

                                            (
                                                
                                                        
                                                         curPage
                                                    
                                                
                                            )

                                        </code>
                                        
                                        <div class="description">
                                            Fires when loading a test page
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>curPage &lt;string&gt;</code>
                                                              the page being loaded
                                                        </dd>
                                                </dl>


                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                                    <div class="">
                                    <h4>
                                        <a name="testpagecomplete">testpagecomplete</a></h4>
                                    <div class="detail">
                                        <code>
                                        
                                         static 
                                        
                                            <strong>testpagecomplete</strong>

                                            (
                                                
                                                        
                                                         obj
                                                    
                                                
                                            )

                                        </code>
                                        
                                        <div class="description">
                                            Fires when a test page is complete
                                        </div>

                                        <div class="description">


                                                <dl>
                                                    <dt>Parameters:</dt>
                                                        <dd>
                                                            <code>obj &lt;page: string, results: object&gt;</code>
                                                              the name of the
page that was loaded, and the test suite results
                                                        </dd>
                                                </dl>


                                        </div>

                                    </div>
                                    <hr />
                                    </div>
                            </div>
                        </div>





			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div class="module">
                        <h4>Modules</h4>
                        <ul class="content">

                                <li class=""><a href="module_animation.html">animation</a></li>

                                <li class=""><a href="module_autocomplete.html">autocomplete</a></li>

                                <li class=""><a href="module_button.html">button</a></li>

                                <li class=""><a href="module_calendar.html">calendar</a></li>

                                <li class=""><a href="module_colorpicker.html">colorpicker</a></li>

                                <li class=""><a href="module_connection.html">connection</a></li>

                                <li class=""><a href="module_container.html">container</a></li>

                                <li class=""><a href="module_datasource.html">datasource</a></li>

                                <li class=""><a href="module_datatable.html">datatable</a></li>

                                <li class=""><a href="module_dom.html">dom</a></li>

                                <li class=""><a href="module_dragdrop.html">dragdrop</a></li>

                                <li class=""><a href="module_editor.html">editor</a></li>

                                <li class=""><a href="module_element.html">element</a></li>

                                <li class=""><a href="module_event.html">event</a></li>

                                <li class=""><a href="module_history.html">history</a></li>

                                <li class=""><a href="module_imageloader.html">imageloader</a></li>

                                <li class=""><a href="module_logger.html">logger</a></li>

                                <li class=""><a href="module_menu.html">menu</a></li>

                                <li class=""><a href="module_slider.html">slider</a></li>

                                <li class=""><a href="module_tabview.html">tabview</a></li>

                                <li class=""><a href="module_treeview.html">treeview</a></li>

                                <li class=""><a href="module_yahoo.html">yahoo</a></li>

                                <li class=""><a href="module_yuiloader.html">yuiloader</a></li>

                                <li class="selected"><a href="module_yuitest.html">yuitest</a></li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class=""><a href="YAHOO.tool.TestCase.html">YAHOO.tool.TestCase</a></li>
                                <li class=""><a href="YAHOO.tool.TestLogger.html">YAHOO.tool.TestLogger</a></li>
                                <li class="selected"><a href="YAHOO.tool.TestManager.html">YAHOO.tool.TestManager</a></li>
                                <li class=""><a href="YAHOO.tool.TestRunner.html">YAHOO.tool.TestRunner</a></li>
                                <li class=""><a href="YAHOO.tool.TestSuite.html">YAHOO.tool.TestSuite</a></li>
                                <li class=""><a href="YAHOO.util.ArrayAssert.html">YAHOO.util.ArrayAssert</a></li>
                                <li class=""><a href="YAHOO.util.Assert.html">YAHOO.util.Assert</a></li>
                                <li class=""><a href="YAHOO.util.AssertionError.html">YAHOO.util.AssertionError</a></li>
                                <li class=""><a href="YAHOO.util.ComparisonFailure.html">YAHOO.util.ComparisonFailure</a></li>
                                <li class=""><a href="YAHOO.util.DateAssert.html">YAHOO.util.DateAssert</a></li>
                                <li class=""><a href="YAHOO.util.ObjectAssert.html">YAHOO.util.ObjectAssert</a></li>
                                <li class=""><a href="YAHOO.util.ShouldError.html">YAHOO.util.ShouldError</a></li>
                                <li class=""><a href="YAHOO.util.ShouldFail.html">YAHOO.util.ShouldFail</a></li>
                                <li class=""><a href="YAHOO.util.UnexpectedError.html">YAHOO.util.UnexpectedError</a></li>
                                <li class=""><a href="YAHOO.util.UnexpectedValue.html">YAHOO.util.UnexpectedValue</a></li>
                                <li class=""><a href="YAHOO.util.UserAction.html">YAHOO.util.UserAction</a></li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class=""><a href="ArrayAssert.js.html">ArrayAssert.js</a></li>
                                <li class=""><a href="Assert.js.html">Assert.js</a></li>
                                <li class=""><a href="DateAssert.js.html">DateAssert.js</a></li>
                                <li class=""><a href="ObjectAssert.js.html">ObjectAssert.js</a></li>
                                <li class=""><a href="TestCase.js.html">TestCase.js</a></li>
                                <li class=""><a href="TestLogger.js.html">TestLogger.js</a></li>
                                <li class=""><a href="TestManager.js.html">TestManager.js</a></li>
                                <li class=""><a href="TestRunner.js.html">TestRunner.js</a></li>
                                <li class=""><a href="TestSuite.js.html">TestSuite.js</a></li>
                                <li class=""><a href="UserAction.js.html">UserAction.js</a></li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Properties</h4>
                        <ul class="content">        
                                <li class="private"><a href="#_curPage">_curPage</a>
                                        <!--<code>&lt;string&gt;</code>-->
                                </li>
                                <li class="private"><a href="#_frame">_frame</a>
                                        <!--<code>&lt;string&gt;</code>-->
                                </li>
                                <li class="private"><a href="#_logger">_logger</a>
                                        <!--<code>&lt;string&gt;</code>-->
                                </li>
                                <li class="private"><a href="#_pages">_pages</a>
                                        <!--<code>&lt;string&gt;</code>-->
                                </li>
                                <li class="private"><a href="#_results">_results</a>
                                        <!--<code>&lt;string&gt;</code>-->
                                </li>
                                <li class="private"><a href="#_timeoutId">_timeoutId</a>
                                        <!--<code>&lt;string&gt;</code>-->
                                </li>
                                <li class=""><a href="#TEST_MANAGER_BEGIN_EVENT">TEST_MANAGER_BEGIN_EVENT</a>
                                        <!--<code>&lt;string&gt;</code>-->
                                </li>
                                <li class=""><a href="#TEST_MANAGER_COMPLETE_EVENT">TEST_MANAGER_COMPLETE_EVENT</a>
                                        <!--<code>&lt;string&gt;</code>-->
                                </li>
                                <li class=""><a href="#TEST_PAGE_BEGIN_EVENT">TEST_PAGE_BEGIN_EVENT</a>
                                        <!--<code>&lt;string&gt;</code>-->
                                </li>
                                <li class=""><a href="#TEST_PAGE_COMPLETE_EVENT">TEST_PAGE_COMPLETE_EVENT</a>
                                        <!--<code>&lt;string&gt;</code>-->
                                </li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Methods</h4>
                        <ul class="content">        
                                <li class="private"><!--<code>Void</code>-->
                                <a href="#_handleTestRunnerComplete">_handleTestRunnerComplete</a>
                                </li>
                                <li class="private"><!--<code>Void</code>-->
                                <a href="#_processResults">_processResults</a>
                                </li>
                                <li class="private"><!--<code>Void</code>-->
                                <a href="#_run">_run</a>
                                </li>
                                <li class=""><!--<code>Void</code>-->
                                <a href="#load">load</a>
                                </li>
                                <li class=""><!--<code>Void</code>-->
                                <a href="#setPages">setPages</a>
                                </li>
                                <li class=""><!--<code>Void</code>-->
                                <a href="#start">start</a>
                                </li>
                                <li class=""><!--<code>Void</code>-->
                                <a href="#stop">stop</a>
                                </li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Events</h4>
                        <ul class="content">        
                                <li class="">
                                <a href="#testmanagerbegin">testmanagerbegin</a>
                                </li>
                                <li class="">
                                <a href="#testmanagercomplete">testmanagercomplete</a>
                                </li>
                                <li class="">
                                <a href="#testpagebegin">testpagebegin</a>
                                </li>
                                <li class="">
                                <a href="#testpagecomplete">testpagecomplete</a>
                                </li>
                        </ul>
                    </div>


            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2007 Yahoo! Inc. All rights reserved.
	</div>
</div>
</body>
</html>
